package com.itfitness.openssldemo

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import com.itfitness.openssldemo.databinding.ActivityMainBinding

class MainActivity : AppCompatActivity() {
    companion object {
        init {
            System.loadLibrary("openssldemo")
        }
    }
    private lateinit var binding: ActivityMainBinding

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        binding = ActivityMainBinding.inflate(layoutInflater)
        setContentView(binding.root)
        binding.sampleText.text = getMD5String("你好")
    }
    /**
     * 获取MD5加密的字符串
     */
    external fun getMD5String(str:String): String

    /**
     * 获取OpenSSL版本号（用于检测导入是否成功）
     */
    external fun openSSLVersion(): String
}